package com.smartrodin.springbootrabbitmq.config.mybatisplus;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;

import java.util.List;

/**
 * @author arnold_nie
 * @Date: Created in 2019-08-09 10:14 AM
 * @description: 自定义 Sql 注入
 */
public class MyBatisPlusSqlInjector extends DefaultSqlInjector {

    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
        List<AbstractMethod> methodList = super.getMethodList( mapperClass );
        //增加自定义方法
        methodList.add( new DeleteAll() );
        methodList.add( new InsertAllBatch() );
        methodList.add( new InsertBatchSomeColumn() );
        return methodList;
    }
}
